﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////


#pragma once
#include "GnufValueInput.h"
#include "GnufWidgetAgentControl.h"

class QWidget;
namespace gnuf {
    class GNUF_BASE_EXPORT WidgetAgentValueInput
        : public ValueInputBase
        , public IWidgetAgentControlHandler
    {
        DEFINE_CAST_DERIVED(gnuf::WidgetAgentValueInput, gnuf::ValueInputBase)
    public:
        explicit WidgetAgentValueInput(std::uint16_t, QWidget *,
            gcmp::OwnerPtr< Info > &, bool transferOwnership = false);
        virtual ~WidgetAgentValueInput();

        WidgetAgentControl * widgetAgentControl() {
            return m_widgetAgentCtrl.get();
        }

    private:
        gcmp::OwnerPtr< WidgetAgentControl > m_widgetAgentCtrl;
    };
}
